#include "AntHill.h"
#include "TextureManager.h"

#include <GL\glut.h>

AntHill::AntHill(float radius) : m_radius(radius)
{
	m_texPath = "crackedearth.jpg";
	m_pos.Y = 2;
}

void AntHill::Draw()
{
	glPushMatrix();

		Texture* tex = TheTextureManager::Instance()->GetTexture(m_texPath);
		//TheTextureManager::Instance()->DrawTexture(m_texPath);
		tex->EnableSphereMap();

		tex->Draw();
		glTranslatef(m_pos.X, m_pos.Y-2, m_pos.Z);
		glRotatef(-90, 1, 0, 0);
		
		
		//glutSolidTorus(0.75, m_radius, 8,8);
		glutSolidSphere(m_radius, 8,8);
		tex->DisableSphereMap();

	glPopMatrix();
}

void AntHill::Update()
{

}